﻿if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[VehicleJob]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE [dbo].[VehicleJob]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[VehicleJob](
	[JobId] [int] IDENTITY(1,1) NOT NULL,
	[VehicleId] [int] NOT NULL,
	[JobDate] [datetime] NULL,
	[Mechanic] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Kms] [varchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[StartTime] [datetime] NULL,
	[EndTime] [datetime] NULL,
	[Damages] [nvarchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[WorkDone] [nvarchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_VehicleJob] PRIMARY KEY CLUSTERED 
(
	[JobId] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF